<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" layout:decorator="layout/base">
<head>
	<title>客户编辑</title>
    <script type="text/javascript" th:src="@{/assets/js/plugins/pickers/daterangepicker.js}"></script>
<style>
	.col-center-block {  
	    float: none;  
	    display: block;  
	    margin-left: auto;  
	    margin-right: auto;  
	}  
	
	.rowDistance{
		padding-top:20px;
	}
</style>  
</head>

<body>
	<!-- Page header -->
	<div class="page-header" layout:fragment="page-header">
		<div class="page-header-content">
			<div class="page-title">
				<h4><i class="icon-arrow-left52 position-left"></i> <span class="text-semibold" th:text="#{web.name}">管理系统</span> - 客户编辑</h4>
			</div>
		</div>
	</div>
	<!-- /page header -->

	<!-- Main content -->
	<div class="content-wrapper" layout:fragment="content">
		
		<div class="panel panel-flat">
					<div class="panel-heading">
						<h6 class="panel-title">编辑客户</h6>
						<div class="heading-elements">
							<ul class="icons-list">
		                		<li><a data-action="collapse"></a></li>
		                	</ul>
	                	</div>
					</div>

	                <div class="panel-body col-md-offset-1">
	                	<form id="edit" class="form-horizontal" action="#">
							<div class="form-group">
								<div class="row">
									<label class="col-lg-1 control-label">姓名<span class="text-danger">*</span>:</label>
									<div class="col-lg-3">
										<div class="col-md-15">
											<input name="name" placeholder="姓名" th:value="${customer.name}" type="text" class="form-control" style="display:inline;" required="true"></input>
										</div>
									</div>

									<label class="col-lg-1 control-label">渠道商<span class="text-danger">*</span>:</label>
									<div class="col-lg-6">	
										<select name="recommendDistributorId" multiple="multiple" th:field="*{customer.recommendDistributorId}" class="select form-control input-xs">
											<option value="-1" >无</option>
											<option th:each="dis : ${distributorList}" th:value="${dis.id}" th:text="${dis.displayName}"></option>
										</select>
									</div>
								</div>
								
								<div class="row rowDistance">
									<label class="col-lg-1 control-label">身份证号:</label>
									<div class="col-lg-3">
										<div class="col-md-15">
											<input onblur="idCardChange()"  th:value="${customer.idCardNo}" name="idCardNo" id="idCardNo" type="text" placeholder="身份证号码" class="form-control" maxlength="50"/>
										</div>
									</div>
									
									<label class="col-lg-1 control-label">生日:</label>
									<div class="col-lg-3">
										<div class="col-md-15">
											<input type="text" id="birthday" th:value="${customer.birthday} ? ${#calendars.format(customer.birthday,'yyyy-MM-dd')}" name="birthday" class="form-control" placeholder="生日" />
										</div>
									</div>
									
									<label class="col-lg-1 control-label">性别:</label>
									<div class="col-lg-2">
										<div class="col-md-15">
											<select name="sex" th:field="*{customer.sex}" class="select form-control input-xs">
												<option th:value="-1" th:text="请选择性别"></option>
												<option th:each="sex : ${sexList}" th:value="${sex.code}" th:text="${sex.name}"></option>
											</select>
										</div>
									</div>
								</div>
								
								<div class="row rowDistance">
									<label class="col-lg-1 control-label">电话号码:</label>
									<div class="col-lg-3">
										<div class="col-md-15">
											<input th:value="${customer.phoneNo}" id="phoneNo" name="phoneNo" type="text" placeholder="电话号码" class="form-control" number="true" maxlength="100"/>
										</div>
									</div>
									
									<label class="col-lg-1 control-label">地址:</label>
									<div class="col-lg-6">
										<div class="col-md-15">
											<input name="address" placeholder="地址" th:value="${customer.address}" type="text" class="form-control"></input>
										</div>
									</div>
								</div>
								
								<div class="row rowDistance">
									<label class="col-lg-1 control-label">档案/病历</label>
									<div class="col-lg-3">
										<div class="col-md-15">	
											<select th:field="*{customer.isHasRecord}"  name="isHasRecord" class="select form-control input-xs">
												<option value="-1" >选择是否建立档案/病历</option>
												<option value="0" >是</option>
												<option value="1" >否</option>
											</select>
										</div>
									</div>
									
									<label class="col-lg-1 control-label">病历号:</label>
									<div class="col-lg-6">
										<div class="col-md-15">
											<input name="recordNo" placeholder="病历号" th:value="${customer.recordNo}" type="text" class="form-control"></input>
										</div>
									</div>
								</div>
								
								<div class="row rowDistance">
									<label class="col-lg-1 control-label">服务老师</label>
									<div class="col-lg-3">
										<div class="col-md-15">	
											<select th:field="*{customer.servantId}" name="servantId" class="select form-control input-xs">
												<option value="-1" >选择服务老师</option>
												<option th:each="servant : ${servants}" th:value="${servant.id}" th:text="${servant.name}"></option>
											</select>
										</div>
									</div>
									
									<label class="col-lg-1 control-label">学历</label>
									<div class="col-lg-3">
										<div class="col-md-15">	
											<select name="education" th:field="*{customer.education}" class="select form-control input-xs">
												<option value="-1" >选择学历</option>
												<option th:each="ed : ${educationList}" th:value="${ed.name}" th:text="${ed.name}"></option>
											</select>
										</div>
									</div>
									
									<label class="col-lg-1 control-label">子女情况:</label>
									<div class="col-lg-2">
										<div class="col-md-15">
											<input name="childStatus" placeholder="子女情况" th:value="${customer.childStatus}" type="text" class="form-control"></input>
										</div>
									</div>
								</div>
								
								<div class="row rowDistance">
									<div class="form-group">
										<label class="col-lg-1 control-label">病史</label>	
										<div class="col-lg-10">
											<div class="col-md-15">
												<textarea th:text="${customer.medicalHistory}" name="medicalHistory" rows="5" cols="20" placeholder="病史" class="form-control"></textarea>
											</div>
										</div>
									</div>
								</div>
								
								<div class="row rowDistance">
									<div class="form-group">
										<label class="col-lg-1 control-label">特殊情况说明</label>	
										<div class="col-lg-10">
											<div class="col-md-15">
												<textarea th:text="${customer.personalDesc}" name="personalDesc" rows="5" cols="20" placeholder="特殊情况说明" class="form-control"></textarea>
											</div>
										</div>
									</div>
								</div>
							</div>
							
							 <div class="col-md-offset-4">
								<input name="id" type="hidden" th:value="${customer.id}"/>
								<input name="level" type="hidden" th:value="${customer.level}"/>
								<input name="type" type="hidden" value="0"/>
								<input name="auditStatus" type="hidden" value="3"/>
								<input name="status" type="hidden" value="0"/>
	                        	<button type="button" id="submit" class="btn btn-primary">保存<i class="icon-search position-right"></i></button>
	                        </div>
                        </form>
                        <input name="currentPage" id="currentPage" type="hidden" th:value="${currentPage}"/>
                        <input type="hidden" id="birthdayHidden" th:value="${customer.birthday}" />
				    </div>
				</div>
		
		<!-- /table -->
		<script type="text/javascript" th:src="@{/oss/js/customerEdit.js}"></script>
	</div>
	<!-- /main content -->

</body>
</html>

